package cn.ekgc.system.dao;

import cn.ekgc.system.pojo.dto.MenuTreeDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 张翰林
 */
public interface UserInfoDao {

    @Select("SELECT syme.id,menu_name, menu_url,menu_type,parent_id\n" +
            "FROM sys_menu syme\n" +
            "LEFT JOIN sys_role_menu syr ON syr.menu_id = syme.id\n" +
            "LEFT JOIN sys_role sr ON syr.role_id = sr.id\n" +
            "LEFT JOIN sys_users_role sur ON  sr.id = sur.role_id\n" +
            "LEFT JOIN sys_user su ON sur.user_id = su.id\n" +
            "WHERE su.id  = #{id }")
    List<MenuTreeDto> getInfoById(Long id);
}
